package com.rd.student.jike.class4.xiayinyin;

import java.util.Scanner;

public class Demo01 {
    public static void main(String[] args) {
        System.out.println("请输入金字塔的层数");
        Scanner scanner = new Scanner(System.in);
        int a = scanner.nextInt();
        for (int i = 1; i < a+1; i++) {
            for (int j = a-i; j >= 1 ; j--) {
                System.out.print(" ");
            }
            for (int j = 0; j < 2*i-1; j++) {
                System.out.print("*");
            }
            System.out.println();
        }
    }
}
